//
// Created by liushuai on 2020/1/31.
//
#include "isValidSudoku.h"
#include <set>
using namespace std;
set<char> getColumnSet(vector<vector<char>>& board,const int col){
    set<char> columnSet;
    for(int i=0;i<9;i++){
        char correntChar = board.at(i).at(col);
        if(correntChar!='.'){
            columnSet.insert(correntChar);
        }
    }
    return columnSet;
}

set<char> getRowSet(vector<vector<char>>& board,const int row){
    set<char> rowSet = set<char>(board.at(row).begin(),board.at(row).end());
    if(rowSet.count('.')){
        rowSet.erase('.');
    }
    return rowSet;
}
bool isValidSudoku(vector<vector<char>>& board){
    bool result=true;
    for(int i = 0;i<9;i++){
        set<char> rowSet = getRowSet(board,i);
        for(int j=0;j<9;j++){
            char currentChar = board.at(i).at(j);
            set<char> columnSet = getColumnSet(board,i);
        }
    }
    return result;
}
